package com.sumer.psychology.comment.domain.model;

import java.io.Serializable;

/**
 * 评论的宿主, Blog, Photo, Share, Micro-Blog, Comment
 * <p/>
 * User: zhenguang.zhu
 * Date: 2014/8/13
 * Time: 14:40
 */
public class CommentHost implements Serializable {
    private String identity;

    public CommentHost(String identity) {
        this.identity = identity;
    }

    public CommentHost() {
    }

    public String identity() {
        return identity;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CommentHost that = (CommentHost) o;

        if (identity != null ? !identity.equals(that.identity) : that.identity != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return identity != null ? identity.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "CommentHost{" +
                "identity='" + identity + '\'' +
                '}';
    }
}
